package com.hujesse.generator.controller;


import com.hujesse.generator.service.IUserService;
import com.hujesse.mapper.SureMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hujesse
 * @since 2021-07-13
 */
@RestController
@RequestMapping("/generator/user")
public class UserController {
    @Autowired
    private IUserService service;
    @RequestMapping("/index2")
    public ModelAndView index(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.setViewName("index");
        modelAndView.addObject("list",service.getById(1));
        return modelAndView;
    }
}

